Skip to content

Import client.tsp from main.tsp for services with no swagger impact#44009

Merged
timotheeguerin merged 2 commits into
Azure:mainfrom
timotheeguerin:tiguerin/import-client-tsp-safe-services
Jun 16, 2026
Merged

Import client.tsp from main.tsp for services with no swagger impact#44009
timotheeguerin merged 2 commits into
Azure:mainfrom
timotheeguerin:tiguerin/import-client-tsp-safe-services

Conversation

@timotheeguerin

@timotheeguerin timotheeguerin commented Jun 16, 2026

Copy link
Copy Markdown
Member

Missed a few simples cases from phase 1.a and 1.b of Azure/typespec-azure#4564

Summary

Makes main.tsp import ./client.tsp for services where doing so has no impact on the published OpenAPI, so client customizations are picked up by tsp compile main.tsp.

Group 1 — no config change needed

client.tsp contains only @@clientName/@@alternateType (client-emitter-only). Adding the import is byte-identical to the current swagger:

  • monitoringservice/resource-manager/Microsoft.Monitor/Agents
  • napster/Napster.CompanionAPI.Management
  • programenrollment/resource-manager/Microsoft.ProgramEnrollment/ProgramEnrollment

Group 2 — import + omit-unreachable-types: true

client.tsp declares shadow create/update models that are referenced only by @@alternateType (invisible to the autorest emitter), so the emitter treats them as unreachable. Enabling omit-unreachable-types drops them; enabling the option alone changes nothing in the current output, so the net swagger change is zero:

  • applink/AppLink.Management
  • edge/Microsoft.Edge.DisconnectedOperations.Management
  • relationships/Relationships.Management

Verification

For every service above, regenerating with the autorest emitter produces byte-identical OpenAPI output (verified current-vs-new), and all compile cleanly under --warn-as-error. Only main.tsp (and tspconfig.yaml for Group 2) change; no generated swagger changes.

Not included

The remaining services that don't yet import client.tsp require more involved work and are intentionally excluded:

  • @scope-based operation customizations (resources/.../policy, resources/.../deploymentStacks, search) — blocked on autorest honoring @scope (feat(typespec-autorest): add @scope TCGC decorator support typespec-azure#4565).
  • Reachable shadow models / @@override / @@clientName-on-operation / property drift (frontdoor, migrate, purviewdatagovernance/DataAccess, storagecache) — need restructuring or a decision on intended output.

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR targets either the main branch of the public specs repo or the RPSaaSMaster branch of the private specs repo. These branches are not intended for iterative development. Therefore, you must acknowledge you understand that after this PR is merged, the APIs are considered shipped to Azure customers. Any further attempts at in-place modifications to the APIs will be subject to Azure's versioning and breaking change policies. Additionally, for control plane APIs, you must acknowledge that you are following all the best practices documented by ARM at aka.ms/armapibestpractices. If you do intend to release the APIs to your customers by merging this PR, add the PublishToCustomers label to your PR in acknowledgement of the above. Otherwise, retarget this PR onto a feature branch, i.e. with prefix release- (see aka.ms/azsdk/api-versions#release--branches).
  • ❌ This PR is in purview of the ARM review (label: ARMReview). This PR must get ARMSignedOff label from an ARM reviewer.
    This PR is awaiting ARM reviewer feedback (label: WaitForARMFeedback).
    To learn when this PR will get reviewed, see ARM review queue at aka.ms/azsdk/pr-arm-review
    For details of the ARM review, see aka.ms/azsdk/pr-arm-review
  • ❌ The required check named SDK Validation Status has failed. Refer to the check in the PR's 'Checks' tab for details on how to fix it and consult the aka.ms/ci-fix guide


Comment generated by summarize-checks workflow run.

@github-actions github-actions Bot added resource-manager TypeSpec Authored with TypeSpec labels Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

@timotheeguerin timotheeguerin changed the title Import client.tsp from main.tsp for services with no spec impact Import client.tsp from main.tsp for services with no swagger impact Jun 16, 2026
@timotheeguerin timotheeguerin marked this pull request as ready for review June 16, 2026 16:28
@timotheeguerin timotheeguerin merged commit 4e3a778 into Azure:main Jun 16, 2026
72 of 75 checks passed
@github-actions github-actions Bot added ARMReview WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ARMReview resource-manager TypeSpec Authored with TypeSpec WaitForARMFeedback <valid label in PR review process> add this label when ARM review is required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants